@import (reference) 'config';
@import (reference) 'icons';

w-rating-stars {
  position: relative;
}

.rating-stars {
  display: flex;
  justify-content: flex-start;
  position: relative;

  &-wrapper {
    &.can-rate:not(.has-balance) {
      &:hover {
        & ~ .tooltip_need-money {
          visibility: visible;
          opacity: 1;
          transition-delay: 0s;
        }
      }
    }
    &.can-rate.has-balance {
      &:hover {
        & ~ .tooltip_vote {
          display: flex;
          align-items: center;
        }
      }
    }
  }

  &__star {
    background-image: @rating-star-icon;
    background-position: left;
    background-repeat: no-repeat;
    width: 19px;
    height: 14px;
    background-size: 14px;

    &.filled {
      background-image: @rating-filled-star-icon;
    }
  }

  &-wrapper.can-rate.has-balance {
    &:hover .rating-stars__star {
      background-image: @rating-filled-star-icon;
    }
    .rating-stars__star {
      cursor: pointer;
    }
    .rating-stars__star:hover ~ .rating-stars__star {
      background-image: @rating-star-icon;
    }
  }

  &.m {
    .rating-stars__star {
      width: 19px;
      height: 14px;
      background-size: 14px;
    }
    div.rating-stars__star:last-child {
      width: 14px;
    }
  }

  &.s {
    .rating-stars__star {
      width: 12px;
      height: 9px;
      background-size: 9px;
    }
    div.rating-stars__star:last-child {
      width: 19px;
    }
  }

  &.xl {
    .rating-stars__star {
      width: 54px;
      height: 40px;
      background-size: 40px;
    }

    div.rating-stars__star:last-child {
      width: 40px;
    }
  }
}